package generator.model;

import generator.MyAnnotation;
import generator.util.BaseBean;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.HashSet;
import java.util.Set;

/**
 * Created with IntelliJ IDEA.
 * User: sunguangzhu
 * Date: 13-7-30
 * Time: 下午9:50
 * To change this template use File | Settings | File Templates.
 */
@Entity
@Table(name = "t_clazz", catalog = "commonproject")
@MyAnnotation(comments = "班级管理")
public class Clazz extends BaseBean {
    @MyAnnotation(comments = "名称")
    private String name;
    @MyAnnotation(comments = "学生集合",relation = "OneToMany")
    private Set<Student> students = new HashSet<Student>(0);
    public static void main(String[] args) throws NoSuchFieldException {
        System.out.println(Student.class.getDeclaredField("clazz").getGenericType().toString());
    }
}
